#include <iostream>
#include <cstdio>

int main(int argc, char const *argv[]){
    int buf[200];
    int n;
    while(scanf("%d", &n) != EOF){
        for (int i = 0; i < n; i++)
            scanf("%d", &buf[i]);
        int result_index = -1;
        int search_num;
        scanf("%d", &search_num);
        for (int i = 0; i < n; i++){
            if (search_num == buf[i]){
                result_index = i;
                break;
            }
        }
        printf("%d\n", result_index);
    }
    return 0;
}
